﻿
{% extends "layout/base.html" %}
{% block content %}
<div id="user_search">
 <h1>Recherche</h1>
<form action="." method="GET">
	<label for="q">Recherche: </label>
	<input type="text" name="q" value="{{ query|escape }}" />
	<input type="submit" value="Search" />
</form>

{% if query %}
	<h2>Resultats pour "{{ query|escape }}":</h2>
	{% if results %}
	  {% for user in results %}
			<a class="user"href="/user_profile/?u={{ user.id|escape }}"> {{ user.username|escape }} {{ user.email|escape }} </a> <br/>
	  {% endfor %}
	{% else %}
	  <p>Pas de résultats pour votre recherche</p>
	{% endif %}
{% endif %}
</div>

{% endblock content %}